from django.contrib import admin
from .models import *
# Register your models here.
@admin.register(School)
class SchoolAdmin(admin.ModelAdmin):
     # 显示的列表信息
    list_display = ('id','name','mark','longitude','latitude','create_date','address','organizers','credit_code','school_type','disable')
    list_filter = ('name','mark')
    list_editable =('name','mark','longitude','latitude','create_date','address','organizers','credit_code','school_type','disable')
    # # 分页，每页显示条数
    # list_per_page = 20


@admin.register(Grade)
class GradeAdmin(admin.ModelAdmin):
     # 显示的列表信息
    list_display = ('id','grade',)
    list_editable =('grade',)
    # # 分页，每页显示条数
    # list_per_page = 20

@admin.register(ClassBj)
class ClassBjAdmin(admin.ModelAdmin):
     # 显示的列表信息
    list_display = ('id','class_bj',)
    list_filter = ('class_bj',)
    list_editable =('class_bj',)
    # # 分页，每页显示条数
    # list_per_page = 20

@admin.register(Subject)
class SubjectAdmin(admin.ModelAdmin):
     # 显示的列表信息
    list_display = ('id','subject',)
    list_filter = ('subject',)
    list_editable =('subject',)
    # # 分页，每页显示条数
    # list_per_page = 20

@admin.register(Nation)
class NationAdmin(admin.ModelAdmin):
     # 显示的列表信息
    list_display = ('id','nation_code','nation',)
    list_filter = ('nation',)
    list_editable =('nation',)
    # # 分页，每页显示条数
    # list_per_page = 20

@admin.register(PoliticalClimate)
class PoliticalClimateAdmin(admin.ModelAdmin):
     # 显示的列表信息
    list_display = ('id','political_climate',)
    list_filter = ('political_climate',)
    list_editable =('political_climate',)
    # # 分页，每页显示条数
#     # list_per_page = 20

